// CustomNode.js
import { RectNode, RectNodeModel } from '@logicflow/core'

class CustomNodeModel extends RectNodeModel {
  // 自定义节点模型
  initNodeData(data) {
    console.log('initNodeData', data)
    super.initNodeData(data)
    this.width = 120
    this.height = 60
    this.text = {
      value: data.text.value || '自定义节点',
      x: data.x,
      y: data.y
    }
  }
}

class CustomNodeView extends RectNode {
  // 自定义节点视图（可选）
}

export default {
  type: 'custom-node',
  view: CustomNodeView,
  model: CustomNodeModel
}